<template>
    <div class="form-group">
        <label class="col-sm-4 control-label">
            <i class="colorRed">*</i> 责任部门：</label>
        <div class="col-sm-8">
            <select class="form-control select2" style="width: 100%;" @change="$emit('input', $event.target.value)">
                <option value="" disabled selected style='display:none;'>请选择</option>
                <option v-for="(lst,index) in deptList" :value="lst.deptId" :id="lst.deptId" :key="index">{{lst.name}}</option>
            </select>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            deptList: [],
        };
    },
    mounted() {
        this.getSelOrderDept()
    },
    methods: {
        getSelOrderDept() {
            this.$api.ticket.list.selOrderDept().then(res => {
                if (res.success) {
                    this.deptList = res.data
                    // console.log(res.data);
                }
            });
        },
    }
};
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.control-label {
  padding: 0;
  line-height: 34px;
  text-align: right;
}
input,
select,
textarea {
  border-radius: 5px;
}
.fa-asterisk {
  font-size: 1px;
  color: red;
}
</style>
